package com.sunyard.manage.schedule;

import com.sunyard.manage.service.TerminalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author jimin.duan
 * @Description TODO
 * @createTime 2022年06月30日 15:40:00
 */
@EnableScheduling
@Component
public class TaskSchedu {

    @Autowired
    private TerminalService terminalService;

    /***
     * 每隔24小时查看机构跟锁具 是否超过有效时间*/
    @Scheduled(cron = "0 0 0/1 * * *")
    public void deletefromlock() {
        terminalService.resetLock();
    }

}
